package com.example.chcrm.entity.supplier;

import com.baomidou.mybatisplus.annotation.*;
import com.example.chcrm.entity.common.OperateRecord;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotBlank;
import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * @Author 邹
 * @Date 2025/4/20 22:56
 * @Version 1.0
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class HighwaySupplierInfo implements Serializable {
    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.INPUT)
    private String id;
    @NotBlank(message = "供应商全称不为空")
    private String name;        //供应商全称
    @NotBlank(message = "供应商简称不为空")
    private String shortName;   //供应商简称
    @NotBlank(message = "详情地址不能为空")
    private String address; //详情地址
    private String phone;   //电话
    private String mailBox; //邮箱

    private Integer auditStatus;    //审核状态 1待审核，2已通过，3已拒绝，4已取消
    private Integer status;     //状态 0：待审核 1:合作中 2：终止合作

    @TableLogic(value = "0", delval = "-1")
    private Integer isDeleted;
    @TableField(fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createTime;    //创建时间

    //----分页----
    @TableField(exist = false)
    private Integer page = 1;
    @TableField(exist = false)
    private Integer rows = 10;
    //----操作记录----
    @TableField(exist = false)
    private List<OperateRecord> operateRecordList;
    @TableField(exist = false)
    private String statusStr;
}